package org.nix.dao;

import org.nix.entity.City;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Create by zhangpe0312@qq.com on 2018/4/19.
 */

public interface CityJpa extends JpaRepository<City,Integer> {

    @Query(nativeQuery = true,
    value = "SELECT * FROM city WHERE city_name = ?1")
    City findCityByCityName(String cityName);

}
